import service from "../utils/request";

// 接口分页
export const newsAuditItem = (params: any) => {
  return service.post("/api/v1/news/text/newsAuditItem/list", params);
};

// 删除
export const Details = (params: any) => {
  return service.get("/api/v1/news/text/newsAuditItem/delete?id=" + params.id);
};

// 添加
export const AuditList = (params: any) => {
  return service.post("/api/v1/news/text/newsAuditItem/add", params);
};

// 更新
export const updateAudit = (params: any) => {
  return service.post("/api/v1/news/text/newsAuditItem/edit", params);
};

// 获取树状数据
export const getTreeData = (type: string) => {
  return service.get(`/api/v1/news/text/newsAuditItem/tree?type=${type}`);
};

//删除
export const deleteAudit = (userIds: number[] | string[]) => {
  const params = userIds.map(id => `${id}`).join(',')
  return service.delete(`/api/v1/news/text/newsAuditItem/deleteBatch?ids=${params}`);
};
